import config from "@/config"
import http from "@/utils/request"

export default {
  getPreviewList: {
    url: `${config.API_URL}/ms/cms/short/list`,
    name: "获取preview列表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  fetchShortsList: {
    url: `${config.API_URL}/ms/cms/fall/`,
    name: "获取剧集列表",
    get: async function(params){
      return await http.get(this.url + params.creatorId, params)
    }
  },
  fetchShortsEpisodeList: {
    url: `${config.API_URL}/ms/cms/fall/drama/`,
    name: "获取剧集下单集",
    get: async function(params){
      return await http.get(this.url + params.shortId, params)
    }
  },
  pushFormData: {
    url: `${config.API_URL}/ms/cms/fall/save`,
    name: "保存preview",
    post: async function(data){
      return await http.post(this.url, data)
    }
  },
  uploadExplore: {
    url: `${config.API_URL}/ms/cms/fall/release/`,
    name: "上架explore",
    get: async function(id){
      return await http.get(this.url + id)
    }
  },
  removeExplore: {
    url: `${config.API_URL}/ms/cms/fall/unpublish/`,
    name: "下架explore",
    get: async function(id){
      return await http.get(this.url + id)
    }
  },
  fetchPreviewList: {
    url: `${config.API_URL}/ms/cms/fall/list`,
    name: "获取preview列表",
    get: async function(params){
      return await http.get(this.url, params)
    }
  },
  delPreviewShort: {
    url: `${config.API_URL}/ms/cms/fall/delete/`,
    name: "删除Short",
    get: async function(params){
      return await http.get(this.url + params)
    }
  },
  fetchPreviewDetail: {
    url: `${config.API_URL}/ms/cms/fall/info/`,
    name: "获取详情",
    get: async function(params){
      return await http.get(this.url+params)
    }
  },
  fetchVideoUrl: {
    url: `${config.API_URL}/ms/cms/fall/preview`,
    name: "预览视频",
    get: async function(params){
      return await http.get(this.url, params)
    }
  },
  
}